// =================================================================================================
//
//	CopyEngine Framework
//	Copyright 2012 Eran. All Rights Reserved.
//
//	This program is free software. You can redistribute and/or modify it
//	in accordance with the terms of the accompanying license agreement.
//
// =================================================================================================

package data.vo
{
    public class LayoutItemVo
    {
        public var itemID:String;

        /**
         * Item的宽高在实际layout中没有任何意义,
         * 这里需要是因为配合右侧的Demo屏幕进行所见即所得的编辑
         */
        public var itemWidth:int;

        /**
         * Item的宽高在实际layout中没有任何意义,
         * 这里需要是因为配合右侧的Demo屏幕进行所见即所得的编辑
         */
        public var itemHeight:int;

        /**
         * 关联目标(关联屏幕还是某一个Target)
         */
        public var relativeTargetX:String;
        public var relativeTargetY:String;

        /**
         * 关联值的类型(像素,百分比,还是居中对齐,上对齐 Etc.)
         */
        public var relativeValueTypeX:int;
        public var relativeValueTypeY:int;

        /**
         * 关联的值(仅当关联值为像素或百分比)时候该值有用
         */
        public var relativeValueX:int;
        public var relativeValueY:int;



        public function LayoutItemVo()
        {
        }

        public function fromJSON(_jsonObj:Object):void
        {
            for (var key:String in _jsonObj)
            {
                this[key] = _jsonObj[key];
            }
        }
    }
}
